package quoc.phu;

import InvoikeServices.HeThongInvoike;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ChatActivity extends Activity {
	Button btnSend;
	TextView txtInput,txtOutput;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chat_test);
        btnSend=(Button)findViewById(R.id.btnSend);
        txtInput=(TextView)findViewById(R.id.txtIn);
        txtOutput=(TextView)findViewById(R.id.txtOut);
        btnSend.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				String noiDung=txtInput.getText().toString();
				try{
					HeThongInvoike.guiTinNhanChat("phu", "phu", noiDung);
				}
				catch (Exception e) {
					Log.d("Phu", "Lỗi");
				}
			}
		});
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_chat_test, menu);
        return true;
    }

    
}
